home *** CD-ROM | disk | FTP | other *** search
- /* unsigned long int htonl(unsigned long int HOSTLONG)
- */
-
- htonl:
- ntohl:
- eor r1, r0, r0, ror #16 @ aEORc bEORd aEORc bEORd
- bic r1, r1, #&00ff0000 @ aEORc 0 aEORc bEORd
- mov r0, r0, ror #8 @ d a b c
- eor r0, r0, r1, lsr #8 @ d c b a
- #ifdef 26BIT /* is there a predefined symbol for this? */
- movs pc, r14
- #else /* 26BIT */
- mov pc, r14
- #endif /* 26BIT */
-
- htons:
- ntohs:
- and r1, r0, #0xff @ 0 0 0 b
- mov r0, r0, lsr #8 @ 0 0 0 a
- orr r0, r0, r1, lsl #8 @ 0 0 b a
- #ifdef 26BIT /* is there a predefined symbol for this? */
- movs pc, r14
- #else /* 26BIT */
- mov pc, r14
- #endif /* 26BIT */
-